<?php
    class V_Check {
        public static function alnum ($str) {
            return preg_match('/[[:alnum:]]+/i',$str);
        }
        public static function phone ($str) {
            return preg_match('/^[+]?[[:digit:]]{5,12}$/i',$str);
        }
    	public static function email ($str) {
            return preg_match('/^[[:alnum:]-_.]+[@].[[:alnum:]-_.]+$/i',$str);
        }
    	public static function date ($str) {
            return preg_match('/^[[:digit:]]{4,4}-[[:digit:]]{2,2}-[[:digit:]]{2,2}$/i',$str);
        }
    	public static function number ($str) {
            return preg_match('/^[[:digit:]]*$/i',$str);
        }
    }